package edu.neusoft.springhtmldemo.service;

import edu.neusoft.springhtmldemo.domain.InspectionManagement;
import edu.neusoft.springhtmldemo.mapper.InspectionManagementMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InspectionManagementService {
    @Autowired
    private InspectionManagementMapper mapper;

    public List<InspectionManagement> showAll() {
        return mapper.selectAll();
    }

    public void updateInspectionManagement(String inspectionNum, String inspectionName,Float inspectionSpd, String inspectionBeginTime, Float inspectionCycle, Integer isInspection) {
        mapper.updateInspectionManagement(inspectionNum,inspectionName,inspectionSpd,inspectionBeginTime,inspectionCycle,isInspection);
    }

    public List<InspectionManagement> selectInspectionManagement(String inspectionNum, String inspectionName, String inspectionSpd, String inspectionBeginTime, String inspectionCycle, String isInspection) {
        return mapper.selectInspectionManagement(inspectionNum,inspectionName,inspectionSpd,inspectionBeginTime,inspectionCycle,isInspection);
    }

    public void addInspectionManagement(InspectionManagement management) {
        mapper.addInspectionManagement(management);
    }

    public void delInspectionManagement(Integer inspectionNum) {
        mapper.delInspectionManagement(inspectionNum);
    }
}
